﻿using System;
using System.Collections.Generic;
using Autodesk.Revit.DB;
using Autodesk.Revit.DB.Structure;

namespace YArchitech.Revit.Structure
{
	public static class RebarEX
	{
		public static void SetRebarShapeId(this Rebar rebar, ElementId shapeId)
		{
			rebar.RebarShapeId = shapeId;
		}

		public static ElementId GetRebarShapeId(this Rebar rebar)
		{
			return rebar.RebarShapeId;
		}

		public static IList<Curve> GetRebarLstCv(this Rebar rebar)
		{
			return rebar.ComputeDrivingCurves();
		}

		public static IList<Curve> GetRebarLstCv(Rebar rebar, bool adjustForSelfIntersection, bool suppressHooks, bool suppressBendRadius, MultiplanarOption multiplanarOption, int barPositionIndex)
		{
			return rebar.GetCenterlineCurves(adjustForSelfIntersection, suppressHooks, suppressBendRadius, multiplanarOption);
		}
	}
}
